<template>
  <div>
    <div class="header">
      <span class="iconfont iconnew"></span>
      <div class="middle">
        <div class="search" @click="toSearch">
          <span class="iconfont iconsearch"></span>
          搜索新闻
        </div>
      </div>
      <router-link to="/profile">
        <span class="iconfont iconwode"></span>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    toSearch() {
      this.$router.push({
        path: "/search"
      });
    }
  }
};
</script>

<style lang="less" scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 13.611vw;
  color: #fff;
  padding: 0 3.333vw;
  background-color: red;
}
.middle {
  flex: 1;
  .search {
    width: 58.333vw;
    height: 9.444vw;
    line-height: 9.444vw;
    text-align: center;
    margin: 0 auto;
    border-radius: 4.722vw;
    background: rgba(255, 255, 255, 0.3);
  }
}
.iconnew {
  font-size: 15vw;
}
.iconwode {
  font-size: 8.889vw;
  opacity: 0.7;
}
</style>